import { Children, lazy } from "react";
import { Navigate } from 'react-router-dom'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'

const Home=lazy(()=>import('../promise/Home'))
const Login=lazy(()=>import('../promise/Login'))
const Mylayout=lazy(()=>import('../promise/MyLayout'))

export const tabbars = [
    {
        path: '/home',
        element: <Home/>,
        title: '首页',
        icon:<FriendsO/>
    }
]
export const routes = [
    {
        path: '/',
        element: <Mylayout />,
        children: [
            ...tabbars,
            {
                path: '/',
                element:<Navigate to='/home'></Navigate>
            }
        ]
    },
    {
        path: '/login',
        element:<Login/>,
    }
]